home *** CD-ROM | disk | FTP | other *** search
/ Java 1996 August / Java - Summer 1996.iso / kaffe-0.2 / kaffe / itypes.c < prev    next >
C/C++ Source or Header  |  1996-02-18  |  1KB  |  58 lines

  1. /*
  2.  * itypes.c
  3.  * Internal types.
  4.  *
  5.  * Copyright (c) 1996 Systems Architecture Research Centre,
  6.  *           City University, London, UK.
  7.  *
  8.  * See the file "license.terms" for information on usage and redistribution
  9.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  10.  *
  11.  * Written by Tim Wilkinson <tim@sarc.city.ac.uk>, February 1996.
  12.  */
  13.  
  14. #include "itypes.h"
  15. #include "baseClasses.h"
  16.  
  17. struct itypes types[MAXTYPES] = {
  18.     /* 0 */            0, "",
  19.     /* 1 */            0, "",
  20.     /* 2 */            0, "",
  21.     /* 3 */            0, "",
  22.     /* TYPE_Boolean */    1, "[Z",
  23.     /* TYPE_Char */        1, "[C", /* Should be 2 for Unicode */
  24.     /* TYPE_Float */    4, "[F",
  25.     /* TYPE_Double */    8, "[D",
  26.     /* TYPE_Byte */        1, "[B",
  27.     /* TYPE_Short */    2, "[S",
  28.     /* TYPE_Int */        4, "[I",
  29.     /* TYPE_Long */        8, "[J",
  30.     /* 12 */        0, "",
  31.     /* 13 */        0, "",
  32.     /* 14 */        0, "",
  33.     /* 15 */        0, "",
  34. };
  35.  
  36. /*
  37.  * Intialise the internal types.
  38.  */
  39. void
  40. initTypes(void)
  41. {
  42.     int i;
  43.  
  44.     /* Translate strings */
  45.     for (i = 0; i < MAXTYPES; i++) {
  46.         types[i].arraySig = addString(types[i].arraySig);
  47.     }
  48. }
  49.  
  50. /*
  51.  * Return the itypes information.
  52.  */
  53. struct itypes*
  54. getITypes(void)
  55. {
  56.     return (types);
  57. }
  58.